﻿<!--#include file="h.asp"--><%
'
'	七色虎建站系统
'	论坛用户页面
'	2011.11.2

Sub main
	Dim id,rs,sql,userid,body_,name_,title_
	Dim birth,sex,remark,city,topic,money,level,title
	Dim formarray(2)
	formarray(0) = http_path&"bbs_user.asp||get||查找会员"
	formarray(1) = "input||id$$$$15$$||<br/>"
	formarray(2) = "hidden||"&bbsSid&"$$"&sid&"||"
	id=getN("id", 0)
	userid=user_array(0)
	checkLogin()'验证登录
	hu.title = "用户页面"
	body_ = checkMsg()'信息
	title_ = bbsUserTitle
	If id=0 Or id=userid Then
		sql = "select top 1 u.sex,u.name,u.remark,u.city,u.logtime,u.birthday,u.topic,u.reply,u.money,u.experience,u.points,c.name as bbs,c.classid as bbsid,"&_
			"u.hu_level,status from 74hu_user u left join 74hu_bbs c on (u.id=c.host) where u.id="&userid
		Set rs=hu.conn(sql)
		If Not rs.eof Then
			birth = rs("birthday")
			sex = rs("sex")
			remark = rs("remark")&""
			city = rs("city")&""
			topic = rs("topic")
			money = rs("money")
			level = rs("hu_level")
			status = rs("status")
			If title_="1" Then
				'启用论坛称号系统
				title = "[div=odd]称号："&getUserTitle(sex,birth,city,topic,remark,money,level,status)&"[/div]"
			End If
			body_ = body_ & "[div=even]"&noubb(rs("name"))&" ("&userid&") "&hu.url("bbs_logout.asp","安全退出")&"[/div]"&_
				"[div=odd]"&showImg("msgto")&hu.url("bbs_msgs.asp?id="&id,"聊天")&""& showImg("friend")&hu.url("bbs_friend.asp", "好友")&_
				""&showImg("keep")&hu.url("bbs_keep.asp", "收藏")&_
				"<br/>"& showImg("edit")&hu.url("bbs_setting.asp","账户设置")&" "& showImg("sign")&hu.url("bbs_sign.asp","签到")
			If ifNum(rs("bbsid")) Then body_ = body_ & "<br/>"& showImg("glory")&"职务:"&hu.url("bbs_topic.asp?id="&rs("bbsid"),nowml(rs("bbs")))&"版主"
			body_ = body_ & "[/div]"&title&_
				"[div=even]性别："&getSex(sex)&"[/div]"&_
				"[div=odd]签名："&getUserRemark(remark)&"[/div]"&_
				"[div=even]"&bbsMoney&"："&money&"[/div]"&_
				"[div=odd]"&bbsPoint&"："&rs("points")&"[/div]"&_
				"[div=even]经验："&rs("experience")&"[/div]"&_
				"[div=odd]等级："&level&" "&hu.url("bbs_update.asp", "升级")&"[/div]"&_
				"[div=even]城市："&getUserCity_(city)&"[/div]"&_
				"[div=odd]年龄："&getAge(birth)&"岁[/div]"&_
				"[div=even]生日："&birth&"[/div]"&_
				"[div=odd]帖子："&hu.url("bbs_mypost.asp",topic&" 篇")
			If bbsEssay=1 Then body_ = body_ & "<br/>文章："&hu.url("bbs_myessay.asp",getUserEssay(userid)&" 篇")
			body_ = body_ & "[/div][div=even]最后在线: "&noubb(rs("logtime"))&"[/div][div=odd]会员ID号:<br/>" & hu.getForm(formarray) & " " &_
				hu.url("bbs_users.asp", "所有会员") & "[/div]"
		End If
	Else
		sql = "select top 1 u.sex,u.name,u.remark,u.city,u.logtime,u.birthday,u.topic,u.reply,u.money,u.experience,u.points,c.name as bbs,c.classid as bbsid,"&_
			"u.hu_level,status from 74hu_user u left join 74hu_bbs c on (u.id=c.host) where u.id="&id
		Set rs=hu.conn(sql)
		If Not rs.eof Then
			birth = rs("birthday")
			sex = rs("sex")
			remark = rs("remark")&""
			city = rs("city")&""
			topic = rs("topic")
			money = rs("money")
			level = rs("hu_level")
			status = rs("status")
			name_ = noubb(rs("name"))
			If title_="1" Then
				'启用论坛称号系统
				title = "[div=odd]称号："&getUserTitle(sex,birth,city,topic,remark,money,level,status)&"[/div]"
			End If
			body_ = body_ & "[div=even]"&hu.url("bbs_user.asp", name_&" ("&id&")")&"[/div][div=odd]"&_
				showImg("msgto")&hu.url("bbs_msg.asp?id="&id,"发信息")&" "&showImg("friend")& hu.url("bbs_friend.asp?id="&id,"加好友")
			If ifNum(rs("bbsid")) Then body_ = body_ & "<br/>"& showImg("glory")&"职务:"&hu.url("bbs_topic.asp?id="&rs("bbsid"),nowml(rs("bbs")))&"版主"
			body_ = body_ & "[/div]"& title &_
				"[div=even]性别："&getSex(sex)&"[/div]"&_
				"[div=odd]签名："&getUserRemark(remark)&"[/div]"&_
				"[div=even]"&bbsMoney&"："&money&"[/div]"&_
				"[div=odd]"&bbsPoint&"："&rs("points")&"[/div]"&_
				"[div=even]经验："&rs("experience")&"[/div]"&_
				"[div=odd]等级："&level&"[/div]"&_
				"[div=even]城市："&getUserCity_(city)&"[/div]"&_
				"[div=odd]年龄："&getAge(birth)&"岁[/div]"&_
				"[div=even]生日："&birth&"[/div]"&_
				"[div=odd]帖子："&hu.url("bbs_mypost.asp?id="&id,topic&" 篇")
			If bbsEssay=1 Then body_ = body_ &  "<br/>文章："&hu.url("bbs_myessay.asp?id="&id,getUserEssay(id)&" 篇")
			body_ = body_ & "[/div][div=even]最后在线: "&getDiffFromNow(rs("logtime"))&"[/div][div=odd]会员ID号:<br/>" & hu.getForm(formarray) & " " &_
				hu.url("bbs_users.asp", "所有会员") & "[/div]"
			Call setVisitPage("<a href='"&http_path&"bbs_user.asp?id="&id&"&amp;[sid]'>"& name_ &"</a>的信息")
		Else
			body_ = body_ & "[div=nav]-"&hu.url("?aid=index","首页")&"-"&hu.url("bbs_user.asp","会员中心")&"-查找会员[/div]没有这个会员!"
		End If
	End If
	Set rs= Nothing
	hu.body = comUbb(body_)
End Sub

Function getUserCity_(city)
	Dim city_
	If city="" Or IsNull(city) Then Exit Function
	city_ = Split(city, "-")
	If UBound(city_) >0 Then
		getUserCity_ = hu.url("bbs_users.asp?a=area&amp;area="&city_(0), city_(0)) & "-" & hu.url("bbs_users.asp?a=city&amp;area="&city, city_(1))
	Else
		getUserCity_ = hu.url("bbs_users.asp?a=city&amp;area="&city, city)
	End If
End Function
%>